package com.qyapp.sdkplatform.sdk;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;

import com.qyapp.sdkplatform.sdk.IPlatformCallback;

/**
 * Created by 2ustc on 2017/6/26.
 */

public abstract class Platform {
    Activity mActivity;
    String mOpenId;
    IPlatformCallback mPlatformCallback;

    public void init(Activity activity, IPlatformCallback callback, String... args) {
        this.mActivity = activity;
        this.mPlatformCallback = callback;
    }


    public abstract void login();

    public abstract void destroy();



    public String getOpenId() {
        return mOpenId;
    }

    public static ProgressDialog waitDialog(Activity activity, String message) {
        ProgressDialog progressDialog = new ProgressDialog(activity);
        progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progressDialog.setMessage(message);
        progressDialog.setIndeterminate(false);
        ;
        progressDialog.setCancelable(false);
        return progressDialog;
    }
}
